﻿using FarPoint.Web.Spread;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ControlExplorer.samples.RowEditTemplate
{
  public partial class Overview : SpreadDemoPage
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      if (IsPostBack) return;

      FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.RowMode;
      FpSpread1.EnableClientScript = true;
      this.FpSpread1.UseClipboard = false;
    }

    protected void Menu1_MenuItemClick(object sender, System.Web.UI.WebControls.MenuEventArgs e)
    {
      switch (e.Item.Value)
      {
        case "0":
          FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.RowMode;
          FpSpread1.EnableClientScript = true;
          break;
        case "1":
          FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.Normal;
          FpSpread1.EnableClientScript = false;
          break;
        case "2":
          FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.Normal;
          FpSpread1.EnableClientScript = true;
          break;
        default:
          break;
      }
    }
   
  }
}